import request from '@/utils/request'

export default {

    //大纲列表
    getChapterByCourseId(courseId) {
        return request({
            url: '/eduservice/chapter/getChapter/' + courseId,
            method: 'get'
        })
    },
    //添加课程章节
    addChapter(eduChapter) {
        return request({
            url: '/eduservice/chapter/addChapter',
            method: 'post',
            data: eduChapter
        })
    },
    //修改章节
    updateChapter(eduChapter) {
        return request({
            url: '/eduservice/chapter/updateChapter',
            method: 'put',
            data: eduChapter
        })
    },

    //删除章节
    deleteChapter(chapterId) {
        return request({
            url: `/eduservice/chapter/deleteChapter/${chapterId}`,
            method: 'delete'
        })
    },

    //根据章节id获取章节信息
    getChapterByChapterId(chapterId) {
        return request({
            url: '/eduservice/chapter/getChapterByChapterId/' + chapterId,
            method: 'get'
        })
    }



}